import { View } from "./View";
import { IUIView } from "../../ui/IUIView";
import { UIParam } from "../../interfaces";
import { IUIController } from "./IUIController";
import { IModel } from "./IModel";


export class UIView extends View<IUIController, IModel> implements IUIView {
    protected uiParam: UIParam;
    setUIParam(param: UIParam): void {
        this.uiParam = param;
    }

    getPath(): string {
        if (this.uiParam) {
            return this.uiParam.path;
        }
        return ''
    }

    getLayerIndex(): number {
        if (this.uiParam) {
            return this.uiParam.layerIndex;
        }
        return 0
    }

    getID(): any {
        if (this.uiParam) {
            return this.uiParam.id;
        }
        return this.uiParam.path
    }



}